Method and Apparatus for Measuring Operating Characteristics in a Load Control Device

ABSTRACT

A load control device, such as an electronic ballast, for controlling the power delivered from an AC power source to an electrical load, such as one or more fluorescent lamps, comprises a power converter having an inductor and a power switching device coupled to the inductor, a load control circuit adapted to be coupled to the electrical load, and a control circuit operable to calculate an average input power of the load control device. The control circuit may be operable to calculate a cumulative output power of the power converter while the ballast is preheating filaments of the lamps, and to subsequently determine a fault condition in the lamps in response to the calculated cumulative output power of the power converter. Further, the control circuit may be operable to transmit a digital message including the calculated average input power of the load control device.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation application of commonly-assigned U.S.patent application Ser. No. 13/212,556, filed Aug. 18, 2011, which is anon-provisional application of U.S. Provisional Application No.61/374,792, filed Aug. 18, 2010, both entitled METHOD AND APPARATUS FORMEASURING OPERATING CHARACTERISTICS IN A LOAD CONTROL DEVICE, the entiredisclosures of which are hereby incorporated by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a load control device for controllingthe amount of power delivered to an electrical load, specifically, to anelectronic dimming ballast for a gas discharge lamp that is able tomeasure a number of operating characteristics, and to determine that afault condition in the lamp in response to the measured operatingcharacteristic.

2. Description of the Related Art

A load control device is operable to control the amount of powerdelivered from an alternating-current (AC) power source to an electricalload, such as a lighting load or a motor load. Typical load controldevices include, for example, dimmer switches for lighting loads,electronic ballasts for gas discharge lamps, light-emitting diode (LED)drivers for LED light sources, and motor control devices for motorloads. Some prior art load control device have included powermeasurement circuits for measuring an input current of the load controldevice. For example, the power measurement circuit may comprise acurrent transformer coupled in series with a hot terminal of the loadcontrol device for sensing the input current as described in greaterdetail in commonly-assigned U.S. Pat. No. 6,528,957, issued Mar. 4,2003, entitled POWER/ENERGY MANAGEMENT CONTROL SYSTEM, the entiredisclosure of which is hereby incorporated by reference. Since currenttransformers tend to be large and expensive, some prior art lightingcontrol devices have estimated the magnitude of the input current independence upon the present intensity of the controlled lighting load asdescribed in commonly-assigned U.S. patent application Ser. No.12/550,972, filed Aug. 31, 2009, entitled METHOD OF LOAD SHEDDING TOREDUCE THE TOTAL POWER CONSUMPTION OF A LOAD CONTROL SYSTEM, the entiredisclosure of which is hereby incorporated by reference.

However, there is a need for a load control device that is moreaccurately able to measure operating characteristics (such as inputpower) without requiring a current transformer.

SUMMARY OF THE INVENTION

According to an embodiment of the present invention, a load controldevice for controlling the power delivered from an AC power source to anelectrical load comprises a power converter having an inductor and apower switching device coupled to the inductor, a load control circuitadapted to be coupled to the electrical load, and a control circuitoperable to calculate an average input power of the load control device.The inductor of the power converter charges when the power switchingdevice is conductive and to discharges when the power switching deviceis non-conductive. The control circuit is operatively coupled to thepower switching device of the power converter for controlling the lengthof an on time for which the power switching device is renderedconductive to generate a DC bus voltage. The load control circuitreceives the bus voltage and controls the power delivered to load. Thecontrol circuit is operatively coupled to the load control circuit forcontrolling the power delivered to the lamp, and receives a controlsignal representative of an instantaneous magnitude of an AC linevoltage of the AC power source. The control circuit uses the on time,the instantaneous magnitude of the AC line voltage, and an inductance ofthe inductor of the power converter to calculate the average input powerof the load control device.

According to another embodiment of the present invention, an electronicballast for driving one or more gas discharge lamps from an AC powersource comprises a boost converter for generating a DC bus voltage, aninverter circuit for converting the bus voltage to a high-frequency ACvoltage, a resonant tank for coupling the high-frequency AC voltage tothe lamps, and a control circuit operable to calculate a cumulativeoutput power of the boost converter while the ballast is preheatingfilaments of the lamps, and to subsequently determine a fault conditionin the lamps. The boost converter comprises an inductor and a powerswitching device coupled to the inductor, such that the inductor isoperable to charge when the power switching device is conductive and todischarge when the power switching device is non-conductive. The controlcircuit is operatively coupled to the power switching device of theboost converter for controlling the length of an on time for which thepower switching device is controlled to be conducive. The controlcircuit is operatively coupled to the load control circuit forcontrolling the power delivered to the lamps, and receives a controlsignal representative of an instantaneous magnitude of an AC linevoltage of the AC power source. The control circuit uses the on time,the instantaneous magnitude of the AC line voltage, and an inductance ofthe inductor of the boost converter to calculate the cumulative outputpower of the boost converter while the ballast is preheating filamentsof the lamps. The control circuit determines the fault condition in thelamps in response to the cumulative output power calculated while theballast circuit is preheating filaments of the lamps.

In addition, a method of detecting a fault condition in one or more gasdischarge lamps driven by an electronic ballast is described herein. Themethod comprises: (1) selectively rendering a power switching device ofa boost converter of the ballast conductive and non-conductive togenerate a DC bus voltage, such that an inductor of the boost converteris operable to charge when the power switching device is conductive andto discharge when the power switching device is non-conductive; (2)adjusting the length of an on time for which the power switching deviceis conductive; (3) converting the bus voltage to a high-frequency ACvoltage; (4) coupling the high-frequency AC voltage to the lamps; (5)preheating filaments of the lamps prior to attempting to strike thelamps; (6) calculating a cumulative output power of the boost converterwhile preheating filaments of the lamps by using the on time, aninstantaneous magnitude of an AC line voltage of the AC power source,and an inductance of the inductor of the boost converter; and (7)detecting the fault condition in the lamps in response to the cumulativeoutput power calculated while preheating filaments of the lamps.

According to another embodiment of the present invention, an electronicballast for driving a gas discharge lamp from an AC power sourcecomprises a boost converter for generating a DC bus voltage, an invertercircuit for converting the bus voltage to a high-frequency AC voltage, aresonant tank for coupling the high-frequency AC voltage to the lamp, acontrol circuit operable to calculate an average input power of theballast, and a communication circuit for transmitting a digital messageincluding the calculated average input power of the ballast. The controlcircuit uses the on time, an instantaneous magnitude of an AC linevoltage of the AC power source, and an inductance of an inductor of theboost converter to calculate the average input power of the ballast, andsubsequently transmits the digital message including the calculatedaverage input power of the ballast via the communication circuit.

Further, a method of transmitting a digital message from a load controldevice for controlling the power delivered from an AC power source to anelectrical load is also described herein. The method comprises: (1)selectively rendering a power switching device of a power converter ofthe load control device conductive and non-conductive to generate a DCbus voltage, such that an inductor of the power converter is operable tocharge when the power switching device is conductive and to dischargewhen the power switching device is non-conductive; (2) adjusting thelength of an on time for which the power switching device is conductive;(3) converting the bus voltage to a high-frequency AC voltage; (4)coupling the high-frequency AC voltage to the lamps; (5) calculating aninput power of the boost converter using the on time, an instantaneousmagnitude of an AC line voltage of the AC power source, and aninductance of the inductor of the boost converter; and (6) transmittinga digital message including the calculated average input power of theload control device.

Other features and advantages of the present invention will becomeapparent from the following description of the invention that refers tothe accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

The invention will now be described in greater detail in the followingdetailed description with reference to the drawings in which:

FIG. 1 is a simplified block diagram of an electronic dimming ballastfor driving a gas discharge lamp according to a first embodiment of thepresent invention;

FIG. 2 is a simplified schematic diagram of a boost convert and aninverter circuit of the ballast of FIG. 1;

FIG. 3 shows example timing diagrams of an inductor current and a busvoltage control signal of the boost converter of FIG. 2 when the boostconverter is operating in critical conduction mode;

FIG. 4 shows example timing diagrams of the inductor current and the busvoltage control signal of the boost converter of FIG. 2 when the boostconverter is operating in discontinuous conduction mode;

FIG. 5 is an example plot a delay time of the boost converter of FIG. 2with respect to a target intensity of the lamp;

FIG. 6 shows example timing diagrams of the magnitude of a load voltage,an operating frequency, and a bus voltage of the ballast of FIG. 1 whilestriking the lamp;

FIG. 7 is a simplified flowchart of a bus voltage control procedureexecuted periodically by a microprocessor of the ballast of FIG. 1;

FIG. 8A is a simplified flowchart of a boost converter control procedureexecuted periodically by the microprocessor of the ballast of FIG. 1;

FIG. 8B is a simplified flowchart of a power calculation procedureexecuted periodically by the microprocessor of the ballast of FIG. 1;

FIG. 9 is a simplified flowchart of a command procedure that is executedby the microprocessor of the ballast of FIG. 1 when a command to controlthe lamp is received;

FIG. 10 is a simplified flowchart of a lamp strike routine that isexecuted by the microprocessor of the ballast of FIG. 1 when the ballastreceives a command to turn the lamp on;

FIG. 11 is a simplified flowchart of a fault detection procedureexecuted periodically by the microprocessor of the ballast of FIG. 1;

FIG. 12A is a simplified flowchart of a boost converter controlprocedure executed periodically by the microprocessor of the ballast ofFIG. 1 according to a second embodiment of the present invention;

FIG. 12B is a simplified flowchart of a power calculation procedureexecuted periodically by the microprocessor of the ballast of FIG. 1according to the second embodiment of the present invention;

FIG. 13 is a simplified block diagram of a light-emitting diode (LED)driver for controlling the intensity of an LED light source according toa third embodiment of the present invention; and

FIG. 14 is a simplified flowchart of a command procedure executed by amicroprocessor of the LED driver of FIG. 16 when a command to controlthe LED light source is received.

DETAILED DESCRIPTION OF THE INVENTION

The foregoing summary, as well as the following detailed description ofthe preferred embodiments, is better understood when read in conjunctionwith the appended drawings. For the purposes of illustrating theinvention, there is shown in the drawings an embodiment that ispresently preferred, in which like numerals represent similar partsthroughout the several views of the drawings, it being understood,however, that the invention is not limited to the specific methods andinstrumentalities disclosed.

FIG. 1 is a simplified block diagram of a load control device, e.g., anelectronic dimming ballast 100, according to a first embodiment of thepresent invention. The ballast 100 comprises a hot terminal H and aneutral terminal N that are adapted to be coupled to analternating-current (AC) power source (not shown) for receiving an ACmains line voltage V_(AC), (e.g. 120 VAC @ 60 Hz), such that the ballast100 conducts an input current I_(IN) from the AC power source.Alternatively, the AC mains line voltage V_(AC) could have a magnitudeof 240 VAC or 277 VAC. The ballast 100 is adapted to be coupled betweenthe AC power source and a lighting load, such as a gas discharge lamp(e.g., a fluorescent lamp 105), such that the ballast is operable tocontrol the amount of power delivered to the lamp and thus the intensityof the lamp. While only one lamp 105 is shown in FIG. 1, the ballast 100may be operable to control the intensities of multiple lamps coupled inseries or in parallel with the output of the ballast. The ballast 100comprises an RFI (radio frequency interference) filter circuit 110 forminimizing the noise provided on the AC mains, and a rectifier circuit120 for generating a rectified voltage V_(RECT) from the AC mains linevoltage V_(AC).

The ballast 100 further comprises a power converter, e.g., a boostconverter 130, which generates a direct-current (DC) bus voltage V_(BUS)across a bus capacitor C_(BUS). The bus voltage V_(BUS) has, forexample, a magnitude (e.g., 465 V) that is greater than the peakmagnitude V_(PK) of the AC mains line voltage V_(AC) (e.g.,approximately 170 volts when the AC mains line voltage V_(AC) has amagnitude of 120 VAC). The boost converter 130 also operates as apower-factor correction (PFC) circuit for improving the power factor ofthe ballast 100. Alternatively, the power converter of the ballast 100could comprise, for example, a buck converter, a buck-boost converter, aflyback converter, a buck-boost flyback converter, a single-endedprimary-inductor converter (SEPIC), a Ćuk converter, or other suitablepower converter circuit.

The ballast 100 further comprises a load control circuit 140 forcontrolling the amount of power delivered to the lamp 105. According tothe first embodiment of the present invention, the load control circuit140 comprises a ballast circuit including an inverter circuit 150 forconverting the DC bus voltage V_(BUS) to a high-frequency AC voltage(e.g., a square-wave voltage V_(SQ)), and a resonant tank circuit 155for coupling the high-frequency AC voltage generated by the invertercircuit to filaments of the lamp 105. The resonant tank circuit 155 maycomprise a resonant inductor (not shown) and a resonant capacitor (notshown), which are characterized by a resonant frequency f_(RES). Theresonant inductor is adapted to be coupled in series between theinverter circuit 150 and the lamp 105, while the resonant capacitor isadapted to be coupled in parallel with the lamp.

Prior to striking the lamp 105, the filaments must be heated during apreheat mode to extend lamp life. Accordingly, the resonant tank circuit155 comprises a plurality of filament windings (not shown) that aremagnetically coupled to the resonant inductor for generating filamentvoltages for heating the filaments of the lamp 105 during the preheatmode. An example of a ballast having a circuit for heating the filamentsof a fluorescent lamp is described in greater detail in U.S. Pat. No.7,586,268, issued Sep. 8, 2009, titled APPARATUS AND METHOD FORCONTROLLING THE FILAMENT VOLTAGE IN AN ELECTRONIC DIMMING BALLAST, theentire disclosure of which is hereby incorporated by reference.

The ballast 100 further comprises a control circuit, e.g., amicroprocessor 160, for controlling the intensity of the lamp 105 to atarget intensity L_(TARGET) between a low-end (i.e., minimum) intensityL_(LE) (e.g., approximately 1%) and a high-end (i.e., maximum) intensityL_(HE) (e.g., approximately 100%). The microprocessor 160 mayalternatively be implemented as a microcontroller, a programmable logicdevice (PLD), an application specific integrated circuit (ASIC), or anysuitable type of controller or control circuit. The ballast 100 alsocomprises a memory 170, which is coupled to the microprocessor 160 forstoring the target intensity L_(TARGET) and other operationalcharacteristics of the ballast. The memory 170 may be implemented as anexternal integrated circuit (IC) or as an internal circuit of themicroprocessor 160. A power supply 172 receives the bus voltage V_(BUS)and generates a DC supply voltage V_(CC) (e.g., approximately fivevolts) for powering the microprocessor 160 and other low-voltagecircuitry of the ballast 100. The ballast 100 further comprises aresistive divider including two resistors R174, R176, which are coupledin series between the rectified voltage V_(RECT) and circuit common andmay have, for example, resistances of approximately 996 kΩ and 6.49 kΩ,respectively. A line voltage control signal V_(LINE) is generated at thejunction of the two resistors R174, R176 and is representative of themagnitude of the rectified voltage V_(RECT). The line voltage controlsignal V_(LINE) is provided to the microprocessor 160, such that themicroprocessor is operable to determine the magnitude of rectifiedvoltage V_(RECT) and the AC mains line voltage V_(AC) from the magnitudeof the line voltage control signal V_(LINE).

The microprocessor 160 is coupled to the inverter circuit 150 andprovides a drive control signal V_(DRIVE) to the inverter circuit forcontrolling the magnitude of a load voltage V_(LOAD) generated acrossthe lamp 105 and the magnitude of a load current I_(LOAD) conductedthrough the lamp. The microprocessor 160 may control one or both of twooperational parameters of the inverter circuit 150 (e.g., an operatingfrequency f_(OP) and an operating duty cycle DC_(OP)) to thus controlthe magnitudes of the load voltage V_(LOAD) and the load currentI_(LOAD). The microprocessor 160 controls the inverter circuit 150 toilluminate the lamp 105 during an on mode, and extinguishes the lamp 105during an off mode. In addition, the microprocessor 160 is operable tocontrol the inverter circuit 150 so as to adjust (i.e., dim) theintensity of the lamp 105 during the on mode. The microprocessor 160receives a load current feedback signal V_(FB-ILOAD), which is generatedby a load current measurement circuit 180 and is representative of themagnitude of the load current I_(LOAD). The microprocessor 160 alsoreceives a load voltage feedback signal V_(FB-VLOAD), which is generatedby a load voltage measurement circuit 182 and is representative of themagnitude of the load voltage V_(LOAD).

The microprocessor 160 is further coupled to the boost converter 130 forcontrolling the magnitude of the bus voltage V_(BUS) to a target busvoltage V_(B-TARGET). Specifically, the microprocessor 160 provides abus voltage control signal V_(B-CNTL) to the boost converter 130 foradjusting the magnitude of the bus voltage V_(BUS) in response to a busvoltage feedback signal V_(B-FB) and a zero-current feedback signalV_(B-ZC) as will be described in greater detail below. Themicroprocessor 160 is operable to adjust the bus voltage V_(BUS) todifferent magnitudes during different operating modes of the ballast 100(i.e., the off mode, the preheat mode, and the on mode).

The ballast 100 may comprise a phase-control circuit 190 for receiving aphase-control voltage V_(PC) (e.g., a forward or reverse phase-controlsignal) from a standard phase-control dimmer (not shown). Themicroprocessor 160 is coupled to the phase-control circuit 190, suchthat the microprocessor is operable to determine the target intensityL_(TARGET) for the lamp 105 from the phase-control voltage V_(PC). Theballast 100 may also comprise a communication circuit 192, which iscoupled to the microprocessor 160 and allows the ballast to communicate(i.e., transmit and receive digital messages) with the other controldevices on a communication link (not shown), e.g., a wired communicationlink or a wireless communication link, such as a radio-frequency (RF) oran infrared (IR) communication link. Examples of ballasts havingcommunication circuits are described in greater detail incommonly-assigned U.S. Pat. No. 7,489,090, issued Feb. 10, 2009,entitled ELECTRONIC BALLAST HAVING ADAPTIVE FREQUENCY SHIFTING; U.S.Pat. No. 7,528,554, issued May 5, 2009, entitled ELECTRONIC BALLASTHAVING A BOOST CONVERTER WITH AN IMPROVED RANGE OF OUTPUT POWER; andU.S. Pat. No. 7,764,479, issued Jul. 27, 2010, entitled COMMUNICATIONCIRCUIT FOR A DIGITAL ELECTRONIC DIMMING BALLAST, the entire disclosuresof which are hereby incorporated by reference.

FIG. 2 is a simplified schematic diagram of the boost converter 130 andthe inverter circuit 150. The inverter circuit 150 comprises first andsecond series-connected switching devices (e.g., FETs Q250, Q252) and aninverter control circuit 254, which controls the FETs in response to thedrive control signal V_(DRIVE) from the microprocessor 160. The invertercontrol circuit 254 may comprise, for example, an integrated circuit(IC), such as part number NCP5111, manufactured by On Semiconductor. Theinverter control circuit 254 may control the FETs Q250, Q252 using a“d(1−d)” complementary switching scheme, in which the first FET Q250 hasa duty cycle of d (i.e., equal to the operating duty cycle DC_(OP)) andthe second FET Q252 has a duty cycle of 1−d, such that only one FET isconducting at a time. When the first FET Q250 is conductive, the outputof the inverter circuit 150 is pulled up towards the bus voltageV_(BUS). When the second FET Q252 is conductive, the output of theinverter circuit 150 is pulled down towards circuit common. Themagnitude of the load current I_(LOAD) conducted through the lamp 105 iscontrolled by adjusting the operating frequency f_(OP) and/or the dutycycle DC_(OP) of the high-frequency square-wave voltage V_(SQ) generatedby the inverter circuit 150.

The boost converter 130 comprises an inductor L210, which receives therectified voltage V_(RECT) from the rectifier circuit 120, conducts aninductor current I_(L), and has an inductance L₂₁₀ of, for example,approximately 0.81 mH. The inductor L210 is coupled to the bus capacitorC_(BUS) via a diode D212. A power switching device, e.g., a field-effecttransistor (FET) Q214 is coupled in series electrical connection betweenthe junction of the inductor L210 and the diode D212 and circuit common,and is controlled to be conductive and non-conductive, so as to generatethe bus voltage V_(BUS) across the bus capacitor C_(BUS). The FET Q214could alternatively be implemented with a bipolar junction transistor(BJT), an insulated-gate bipolar transistor (IGBT), or any suitabletransistor. A resistor divider is coupled across the bus capacitorC_(BUS) and comprises two resistors R216, 8218, which have, for example,resistances of approximately 1392 kΩ and 10 kΩ, respectively. The busvoltage feedback signal V_(B-FB) is generated at the junction of theresistor R216, 8218, such that the magnitude of the bus voltage feedbacksignal V_(B-FB) is representative of the magnitude of the bus voltageV_(BUS).

As shown in FIG. 2, the microprocessor 160 is operatively coupled to theFET Q214 of the boost converter 130 for directly controlling the FETQ214 to be conductive and non-conductive to selectively charge anddischarge the inductor L210 and generate the bus voltage V_(BUS) acrossthe bus capacitor C_(BUS). The boost converter 130 comprises a drivecircuit 220, which is coupled to a gate of the FET Q214 for renderingthe FET conductive and non-conductive in response to the bus voltagecontrol signal V_(B-CNTL) from the microprocessor 160. Themicroprocessor 160 controls the bus voltage control signal V_(B-CNTL) toadjust a power-conversion-drive level of the FET Q214 for controllinghow long the FET Q214 is rendered conductive and thus the magnitude ofthe bus voltage V_(BUS).

The drive circuit 220 comprises FET Q221 having a gate that receives thebus voltage control signal V_(B-CNTL) from the microprocessor 160 and iscoupled to the DC supply voltage V_(CC) through a resistor 8222 (e.g.,having a resistance of approximately 10 kΩ). The drain of the FET Q221is also coupled to the DC supply voltage V_(CC) through a resistor R223,which has, for example, a resistance of approximately 6.04 kΩ. Thejunction of the FET Q221 and the resistor R223 is coupled to the basesof an NPN bipolar junction transistor Q224 and a PNP bipolar junctiontransistor R225. The emitters of the transistor Q224, Q225 are coupledtogether through a resistor R226 (e.g., having a resistance ofapproximately 100Ω). The junction of the emitter of the transistor Q225and the resistor 8226 is coupled to the gate of the FET Q214. A diodeD228 is coupled between the gate of the FET Q214 and the DC supplyvoltage V_(CC), while a diode D229 is coupled between circuit common andthe gate of the FET Q214. When the bus voltage control signal V_(B-CNTL)is driven high towards the DC supply voltage V_(CC), the FET Q221 andthus the transistor Q225 are rendered conductive, thus pulling the gateof the FET Q214 down towards circuit common, such that the FET Q214 isrendered non-conductive. When the bus voltage control signal V_(B-CNTL)is driven low towards circuit common, the FET Q221 is renderednon-conductive, and the transistor Q224 pulls the gate of the FET Q214up towards the DC supply voltage V_(CC), thus rendering the FET Q214conductive.

The boost converter 130 also comprises an over-current protectioncircuit 230, which operates to render the FET Q214 non-conductive in theevent of an over-current condition in the FET. The over-currentprotection circuit 230 comprises a sense resistor 8232 that is coupledin series with the FET Q214 and has a resistance of, for example,approximately 0.075Ω. The voltage generated across the sense resistor8232 is coupled to the base of an NPN bipolar junction transistor Q233via a resistor 8234 (e.g., having a resistance of approximately 392Ω).The base of the transistor Q233 is also coupled to circuit commonthrough a resistor R235 (e.g., having a resistance of approximately4.02Ω) and a capacitor C236 (e.g., having a capacitance of approximately1000 pF). The collector of the transistor Q233 is coupled to thejunction of the transistor Q224, 225 of the drive circuit 220 through aresistor 8238 (e.g., having a resistance of approximately 22.1 kΩ). Thejunction of the transistor Q233 and the resistor 8238 is coupled to thebase of a PNP bipolar junction transistor Q239. When the voltage acrossthe sense resistor 8232 exceeds a predetermined over-current thresholdvoltage (i.e., as a result of an over-current condition in the FET Q214,e.g., approximately 10 amps), the transistor Q233 is renderedconductive, thus pulling the bases of the transistors Q224, Q225 downtowards circuit common and rendering the FET Q214 non-conductive. Atthis time, the transistor Q239 is also rendered conductive, thuslatching the transistor Q233 in the conductive state until the presentdrive pulse ends (i.e., the gate of the FET Q214 is driven low).

The boost converter 130 further comprises a zero-current detect circuit240, which generates the zero-current feedback signal V_(B-ZC) when themagnitude of the voltage induced by the inductor L210 collapses toapproximately zero volts to indicate when the magnitude of the inductorcurrent I_(L) conducted by the inductor is approximately zero amps. Thezero-current detect circuit 240 comprises a control winding 242 that ismagnetically coupled to the inductor L210. The control winding 242 iscoupled in series with two resistors 8244, 8245, which each have, forexample, resistances of approximately 22 kΩ. The junction of theresistor R244, 8245, is coupled to the base of an NPN bipolar junctiontransistor Q246. The collector of the transistor Q246 is coupled to theDC supply voltage V_(CC) through a resistor R248 (e.g., having aresistance of approximately 2.15 kΩ), such that the zero-currentfeedback signal V_(B-ZC) is generated at the collector of thetransistor. When the voltage across the inductor L210 is greater thanapproximately zero volts, a voltage is produced across the controlwinding 242 and the transistor Q246 is rendered conductive, thus drivingthe zero-current feedback signal V_(B-ZC) down towards circuit common.When the magnitude of the inductor current I_(L) drops to approximatelyzero amps, the transistor Q246 is rendered non-conductive and thezero-current feedback signal V_(B-ZC) is pulled up towards the DC supplyvoltage V_(CC).

The microprocessor 160 controls the FET Q214 to selectively operate theboost converter 130 in critical conduction and discontinuous conductionmodes. FIG. 3 shows example timing diagrams of the inductor currentI_(L) and the bus voltage control signal V_(B-CNTL) when the boostconverter 130 is operating in the critical conduction mode. In criticalconduction mode, the FET Q214 is controlled to be conductive when theinductor current I_(L) drops to zero amps. The FET Q214 is maintainedconductive for an on time T_(ON), such that the inductor current I_(L)increases in magnitude with respect to time during the on time T_(ON)and rises to a peak inductor current I_(L-PK). The FET Q214 is thencontrolled to be non-conductive for an off time T_(OFF), such that theinductor current I_(L) decreases in magnitude with respect to time untilthe magnitude of the inductor current I_(L) reaches zero amps, at whichtime the FET Q214 is once again rendered conductive. FIG. 4 showsexample timing diagrams of the inductor current I_(L) and the busvoltage control signal V_(B-CNTL) when the boost converter 130 isoperating in the discontinuous conduction mode. In the discontinuousmode, the FET Q214 is controlled to be conductive for the on time T_(ON)and to be non-conductive for the off time T_(OFF). However, when theinductor current I_(L) drops to approximately zero amps, the FET Q214 ismaintained non-conductive for a delay time T_(DELAY), such that theinductor current I_(L) does not begin to increase in magnitude, butremains at approximately zero amps. While not shown in FIG. 3, there maybe some oscillations in the inductor current I_(L) during the delay timeT_(DELAY) after the FET Q214 is rendered non-conductive.

According to an embodiment of the present invention, the microprocessor160 is operable to calculate an average input power P_(IN-AVE) of theballast 100 using the inductance of the inductor L₂₁₀, the magnitudes ofthe bus voltage V_(BUS) and the rectified voltage V_(RECT), and thelengths of the on time T_(ON) and the delay time T_(DELAY). Themicroprocessor 160 may transmit the average input power P_(IN-AVE) ofthe ballast 100 to, for example, a central controller (not shown) viathe communication circuit 192. In addition, the microprocessor 160 maybe operable to calculate an average output power P_(OUT-AVE) of theboost converter 130 while the ballast 100 is preheating the filaments ofthe lamp 105, and to detect a fault condition in the lamp 105 inresponse to the average output power P_(OUT-AVE) as will be described ingreater detail below.

The microprocessor 160 is operable to adjust the length of the on timeT_(ON) in response to the magnitude of the bus voltage V_(BUS) (i.e., asdetermined from the bus voltage feedback signal V_(B-FB)) to thus adjustthe magnitude of the bus voltage. Specifically, the microprocessor 160is operable to increase the on time T_(ON) to increase the magnitude ofthe bus voltage V_(BUS) and to decrease the on time T_(ON) to decreasethe magnitude of the bus voltage V_(BUS). The microprocessor 160 doesnot control the on time T_(ON) to be greater than a maximum on timeT_(ON-MAX) (e.g., approximately 23 microseconds).

The microprocessor 160 is operable to control the delay time T_(DELAY)in response to the target intensity L_(TARGET) of the lamp 105. FIG. 5is an example plot of the length of the delay time T_(DELAY) withrespect to the target intensity L_(TARGET) of the lamp 105. Above adelay time threshold intensity L_(D-TH) (e.g., approximately 60%), themicroprocessor 160 controls the delay time T_(DELAY) to be approximatelyzero seconds. When the target intensity L_(TARGET) of the lamp 105 isgreater than the delay time threshold intensity L_(D-TH), themicroprocessor 160 adjusts the delay time T_(DELAY) linearly withrespect to the target intensity L_(TARGET) as shown in FIG. 5.

The microprocessor 160 is operable to adjust the bus voltage V_(BUS) todifferent magnitudes during different operating modes of the ballast 100(e.g., the off mode, the preheat mode, and the on mode). FIG. 6 showsexample timing diagrams of the magnitude of the load voltage V_(LOAD),the operating frequency f_(OP), and the bus voltage V_(BUS) while themicroprocessor 160 is striking the lamp 105. When the lamp 105 is off(i.e., in the off mode), the microprocessor 160 controls the boostconverter 130 to maintain the bus voltage V_(BUS) at an off-bus-voltagemagnitude V_(B-OFF), which is greater than zero volts and may be, forexample, equal to approximately 205 volts when the AC mains line voltageV_(AC) has a nominal magnitude of 120 VAC. Since the boost converter 130is not off, but is generating the bus voltage V_(BUS), during the offmode, the ballast 100 is able to quickly illuminate (i.e., strike) thelamp 105. Alternatively, the off-bus-voltage magnitude V_(B-OFF) may beequal to approximately 430 volts when the AC mains line voltage V_(AC)has a magnitude of 277 VAC. In addition, the boost converter 130 couldbe turned off when the lamp 105 is off, such that the magnitude of thebus voltage V_(BUS) is equal to approximately the peak magnitude V_(PK)of the AC mains line voltage V_(AC) (i.e., approximately 170 volts whenthe AC mains line voltage V_(AC) has a magnitude of 120 VAC), and theballast 100 consumes even less power.

After receiving a command to strike the lamp 105 (i.e., at time t₁ inFIG. 6), the microprocessor 160 first preheats the filaments of the lamp105 for a preheat time period T_(PREHEAT) (e.g., approximately onesecond) during the preheat mode. Specifically, the microprocessor 160controls the operating frequency f_(OP) of the inverter circuit 150 toadjust the load voltage V_(LOAD) to a predetermined preheat load voltageV_(L-PRE), such that the operating frequency f_(OP) is approximatelyequal to a preheat frequency f_(PREHEAT), e.g., approximately 130 kHz,during the preheat mode. In addition, the microprocessor 160 controlsthe bus voltage V_(BUS) to a preheat-bus-voltage magnitude V_(B-PRE)during the preheat mode. The preheat-bus-voltage magnitude V_(B-PRE) isgreater than the off-bus-voltage magnitude V_(B-OFF), and may be, forexample, approximately 500 volts, such that the magnitude of the busvoltage V_(BUS) provided to the resonant tank circuit 155 is greatenough to appropriately heat the filaments of the lamp 105 during thepreheat mode, but does not exceed the rated voltage of the bus capacitorC_(BUS). Specifically, when the magnitude of the bus voltage V_(BUS) isat the preheat-bus-voltage magnitude V_(B-PRE), the ratio of the voltageacross the resonant inductor of the resonant tank circuit 155 withrespect to the voltage across the resonant capacitor increases, suchthat the ratio of the magnitudes of the filament voltages with respectto the magnitude of the load voltage V_(LOAD) generated across the lamp105) also increases. Since there is a relatively low voltage across thelamp 105, the lamp does not glow or strike during the preheat timeperiod T_(PREHEAT).

After preheating the filaments of the lamp 105 (i.e., after the preheattime period T_(PREHEAT) at time t₂ in FIG. 6), the microprocessor 160sweeps the operating frequency f_(OP) of the inverter circuit 150 downfrom the preheat frequency f_(PRE) towards the resonant frequencyf_(RES) of the resonant tank circuit 155, such that the magnitude of theload voltage V_(LOAD) increases until the lamp 105 strikes (i.e., attime t₃ in FIG. 6). When the lamp 105 strikes, the magnitude of the loadvoltage V_(LOAD) decreases and the magnitude of the load currentI_(LOAD) increases, such that the microprocessor 160 is able to detectthe lamp strike in response to the load voltage feedback signalV_(FB-VLOAD) and the load current feedback signal V_(FB-ILOAD). Whilethe lamp 105 is illuminated (i.e., in the on mode), the microprocessor160 adjusts the magnitude of the bus voltage V_(BUS) to anon-bus-voltage magnitude V_(ON-BUS), for example, approximately 465volts, which is less than the preheat-bus-voltage magnitude V_(B-PRE),but greater than the off-bus-voltage magnitude V_(B-OFF). In otherwords, the magnitude of the bus voltage V_(BUS) is largest during thepreheat mode, and smallest when the lamp 105 is off, such that theballast 100 consumes less power.

In addition, the microprocessor 160 is operable to preemptively adjustthe power-conversion-drive level of the FET Q214 to begin adjusting themagnitude of the bus voltage V_(BUS) prior to changing modes ofoperation. When attempting to strike the lamp 105, the microprocessor160 is operable to control the boost converter 130 (i.e., at time t₁ inFIG. 6) to begin increasing the magnitude of the bus voltage V_(BUS)from the off-bus-voltage magnitude V_(B-OFF) to the preheat-bus-voltagemagnitude V_(B-PRE) prior to controlling the inverter circuit 150 toadjust the operating frequency f_(OP) to the preheat frequency f_(PRE).For example, the microprocessor 160 monitors the magnitude of the busvoltage V_(BUS) after adjusting the power-conversion-drive level of theFET Q214, and may control the inverter circuit 150 to begin preheatingthe filaments of the lamp 105 when the magnitude of the bus voltageV_(BUS) is equal to approximately the preheat-bus-voltage magnitudeV_(B-PRE), such that a predetermined turn-on preload time periodT_(PRELOAD-ON) exists between when the microprocessor 160 adjusts thepower-conversion-drive level of the FET Q214 and when the microprocessoradjusts the operating frequency f_(OP) to the preheat frequency f_(PRE)(as shown in FIG. 6). Accordingly, the length of the turn-on preloadtime period T_(PRELOAD-ON) may not be the same each time that the lampis turned on. Alternatively, the microprocessor 160 may wait for apredetermined turn-on preload time period T_(PRELOAD-ON) (e.g.,approximately 50 milliseconds) after adjusting the target bus voltageV_(B-TARGET) before adjusting the operating frequency f_(OP).

The microprocessor 160 may be operable to detect a fault condition inthe load (i.e., in the lamps 105 connected to the ballast 100) inresponse to the calculated average output power P_(OUT-AVE) of the boostconverter 130 while the ballast 100 is preheating the filaments of thelamp 105 (i.e., during the preheat time period T_(PREHEAT)). Themicroprocessor 160 is able to confirm that the correct type and numberof lamps are connect to the ballast 100 if the average output powerP_(OUT-AVE) of the boost converter 130 is within predeterminedthresholds (i.e., limits) P_(T1), P_(T2). The values of thepredetermined thresholds P_(T1), P_(T2) may be chosen to ensure that thecorrect type and number of lamps are connected to the ballast 100.Specifically, the predetermined thresholds P_(T1), P_(T2) may be equalto the minimum possible average power draw and the maximum averagepossible power draw, respectively, in the filaments of the correct typeand number of lamps during the preheat time period T_(PREHEAT). Forexample, the predetermined thresholds P_(T1), P_(T2) may beapproximately 2.5 W and 3.5 W, respectively, for a single-lamp ballast.

If the average output power P_(OUT-AVE) is outside the predeterminedthresholds P_(T1), P_(T2), the microprocessor 160 is operable todetermine that a fault condition exists in the lamps. For example, themicroprocessor 160 may be operable to determine that at least one of thelamps 105 is the wrong lamp type, a wrong number of lamps are connectedto the ballast 100 (e.g., at least one of the lamps missing), and/or atleast one of the lamps has a broken filament if the average output powerP_(OUT-AVE) is outside the predetermined thresholds P_(T1), P_(T2).After determining that a fault condition exists in the lamps 105 whilepreheating the filaments, the microprocessor 160 does not attempt tostrike the lamps and keeps the lamps turned off. Alternatively, themicroprocessor 160 could use a cumulative output power P_(OUT-CUM)accumulated during the preheat time period T_(PREHEAT) to determine thata fault condition exists in the lamps.

Different lamp types may also have different power consumptions near thehigh-end intensity L_(HE). Accordingly, the microprocessor 160 isoperable to measure the average output power P_(OUT-AVE) during apredetermined time period T_(FAULT) (e.g., approximately one second)when the target intensity L_(TARGET) is at the high-end intensityL_(HE), and to determine that a fault condition exits in the lamps 105(i.e., at least one of the lamp is the wrong lamp type) if the averageoutput power P_(OUT-AVE) during the predetermined time period T_(FAULT)is outside predetermined thresholds P_(T3), P_(T4), as will be describedin greater detail below with reference to FIG. 11. The predeterminedthresholds P_(T3), P_(T4) may be equal to the minimum possible averagepower draw and the maximum possible average power draw, respectively, ofthe correct type and number of lamps at the high-end intensity L_(HE)during the predetermined time period T_(FAULT). For example, thepredetermined thresholds P_(T3), P_(T4) may be approximately 40 W and 60W, respectively, for a ballast driving a 54-W lamp with a ballast factorof 1.00.

FIG. 7 is a simplified flowchart of a bus voltage control procedure 300executed periodically by the microprocessor 160 (e.g., approximatelyevery 104 microseconds). The microprocessor 160 first calculate a busvoltage error e_(BUS) at step 310 by subtracting the target bus voltageV_(B-TARGET) from the bus voltage V_(BUS) (as determined from the busvoltage feedback signal V_(B-FB)), i.e.,

e _(BUS) =V _(BUS) −V _(B-TARGET).  (Equation 1)

If the bus voltage error e_(BUS) is greater than zero at step 312 (i.e.,the magnitude of the bus voltage V_(BUS) is greater than the target busvoltage V_(B-TARGET)), the microprocessor 160 decreases the on timeT_(ON) at step 314 by processing a digital implementation of afrequency-domain transfer function G(s), e.g.,

$\begin{matrix}{{{G(s)} = \frac{K \cdot \left( {s + a} \right)}{s\left( {s + b} \right)}},} & \left( {{Equation}\mspace{14mu} 2} \right)\end{matrix}$

where a equals approximately 17, b equals approximately 96.7, and Kequals approximately −258. Other values of a, b, and K may be neededbased upon the voltage conversion ratios as well known in the art. Ifthe bus voltage error e_(BUS) is less than zero at step 316 (i.e., themagnitude of the bus voltage V_(BUS) is less than the target bus voltageV_(B-TARGET)), the microprocessor 160 increases the on time T_(ON) usinga transfer function G(s) at step 318. If the on time T_(ON) is greaterthan the maximum on time T_(ON-MAX) at step 320, the microprocessor 160limits the on time T_(ON) to the maximum on time T_(ON-MAX) at step 322,and the bus voltage control procedure 300 exits.

FIG. 8A is a simplified flowchart of a boost converter control procedure400 executed periodically by the microprocessor 160 (e.g., approximatelyevery 104 microseconds). The microprocessor 160 uses an on timer and adelay timer to keep track of the time periods of the inductor currentI_(L) and the bus voltage control signal V_(B-CNTL) shown in FIGS. 3 and4. If the delay timer has just expired at step 410 (i.e., at the end ofthe delay time T_(DELAY)), the microprocessor 160 initializes the ontimer to the present value of the on time T_(ON) (i.e., as determinedfrom the bus voltage control procedure 300 of FIG. 7) and starts the ontimer decreasing in value with respect to time at step 412. Themicroprocessor 160 then drives the bus voltage control signal V_(B-CNTL)low towards circuit common at step 414 (such that the FET Q214 of theboost converter 130 is rendered conductive), and the boost convertercontrol procedure 400 exits. Accordingly, the inductor current I_(L)increases in magnitude with respect to time during the on time T_(ON) asshown in FIGS. 3 and 4.

When the on timer expires at step 416 (i.e., at the end of the on timeT_(ON)), the microprocessor 160 drives the bus voltage control signalV_(B-CNTL) high towards the DC supply voltage V_(CC) at step 418, suchthat the FET Q214 of the boost converter 130 is rendered non-conductiveand the inductor current I_(L) begins decreasing in magnitude withrespect to time.

When the magnitude of the inductor current I_(L) drops to zero amps (asdetermined from the zero-current feedback signal V_(B-ZC) from the boostconverter 130) at step 420, the microprocessor 160 determines if thedelay time T_(DELAY) is presently equal to zero seconds at step 422. Ifthe delay time T_(DELAY) is not equal to zero seconds at step 422, themicroprocessor 160 initializes the delay timer with the present value ofthe delay time T_(DELAY) (as determined from the bus voltage controlprocedure 300 of FIG. 7) and starts the delay timer decreasing in valuewith respect to time at step 424, before the boost converter controlprocedure 400 exits. The microprocessor 160 will render the FET Q214 ofthe boost converter 130 conductive at step 414 when the delay timerexpires at step 410. If the delay time T_(DELAY) is equal to zeroseconds at step 422 when the magnitude of the inductor current I_(L)drops to zero amps at step 420, the microprocessor 160 starts the ontimer at step 412 and drives the bus voltage control signal V_(B-CNTL)low towards circuit common at step 414 to render the FET Q214conductive, before the boost converter control procedure 400 exits.

FIG. 8B is a simplified flowchart of a power calculation procedure 450that is executed periodically by the microprocessor 160 at a samplingperiod T_(SAMP) (e.g., approximately every 104 microseconds). First, themicroprocessor 160 samples the line voltage control signal V_(LINE) todetermine the magnitude of the rectified voltage V_(RECT) at step 452.At step 454, the microprocessor 160 calculates the magnitude of the peakinductor current I_(L-PK) for the present sampling period, i.e.,

I _(L-PK) =V _(RECT) ·T _(ON) /L ₂₁₀.  (Equation 3)

The microprocessor 160 then calculates an instantaneous input powerP_(INST) of the ballast 100 at step 456, i.e.,

$\begin{matrix}{{P_{INST} = \frac{V_{RECT} \cdot I_{L\text{-}{PK}}}{1 + {\frac{T_{DELAY}}{T_{ON}} \cdot \frac{V_{BUS} - V_{RECT}}{V_{BUS}}}}},} & \left( {{Equation}\mspace{14mu} 4} \right)\end{matrix}$

using the lengths of the on time T_(ON) and the delay time T_(DELAY)that are presently being used to control the FET Q214 of the boostconverter 130. At step 458, the microprocessor 160 uses a runningaverage to calculate the average input power P_(IN-AVE) of the ballast100 using the instantaneous power P_(INST) calculated at step 454.

The microprocessor is then operable to calculate the cumulative outputpower P_(OUT-CUM) of the boost converter 130 at step 460, i.e.,

P _(OUT-CUM) =P _(OUT-CUM) +P _(INST) −P _(LOSS),  (Equation 5)

where P_(LOSS) is a constant representing the power loss due to thepower dissipated in the boost converter 130 and due to a propagationdelay in the turn-on of the FET Q214 (e.g., approximately 5% of theoutput power of the boost converter 130 at the high-end intensityL_(HE), i.e., approximately 6 W for a ballast driving two 54-W lamps).The microprocessor 160 is operable to use the value calculated at step460 to determine the cumulative output power P_(OUT-CUM) of the boostconverter 130 while preheating the filaments of the lamp 105 (i.e.,during the preheat time period T_(PREHEAT)) to thus determine if thecorrect number and type of lamps are connected to the ballast 100 and/orto determine if any of the lamps are missing or faulty (as will bedescribed in greater detail below with reference to FIG. 10). The powerloss constant P_(LOSS) could alternatively be a variable value, forexample, dependent upon the magnitude of the AC mains lines voltageV_(AC) as determined from the magnitude of the rectified voltageV_(RECT).

According to an alternative embodiment of the present invention, themicroprocessor 160 is only operable to control the boost converter 130to operate in critical conduction mode. Since the delay time T_(DELAY)will always be zero seconds, the microprocessor 160 is operable to use asimplified equation to calculate the instantaneous input power P_(INST),i.e.,

P _(INST)=½·V _(RECT) ·I _(L-PK),  (Equation 6)

at step 454 of the power calculation procedure 450.

FIG. 9 is a simplified flowchart of a command procedure 500 that isexecuted by the microprocessor 160 when a command to control the lamp105 is received via the phase-control circuit 190 or the communicationcircuit 192 at step 510. If the received command is a command to turnthe lamp 105 off at step 512, the microprocessor 160 first stores thepresent target intensity L_(TARGET) of the lamp in the memory 170 atstep 514, controls the target intensity L_(TARGET) of the lamp 105 to 0%(i.e., to turn the lamp off) at step 520, and adjusts the drive controlsignal V_(DRIVE) to the inverter circuit 150 to turn the lamp off atstep 522, before the command procedure 500 exits.

If the microprocessor 160 has received a command to turn the lamp 105 onat step 524, and the lamp is not already on at step 525, themicroprocessor executes a lamp strike routine 600 to attempt to strikethe lamp (which will be described in greater detail below with referenceto FIG. 10). If the lamp 105 is already on at step 525, themicroprocessor 160 does not attempt to strike the lamp again as part ofthe lamp strike routine 600. The microprocessor 160 then adjusts thedelay time T_(DELAY) in response to the target intensity L_(TARGET) ofthe lamp 105. Specifically, if the target intensity L_(TARGET) isgreater than or equal to the delay time threshold intensity L_(D-TH) atstep 526, the microprocessor 160 sets the delay time T_(DELAY) equal tozero seconds at step 528, and the command procedure 500 exits. If thetarget intensity L_(TARGET) is less than the delay time thresholdintensity L_(D-TH) at step 526, the microprocessor 160 adjusts the delaytime T_(DELAY) in response to target intensity L_(TARGET) at step 530(e.g., as shown in FIG. 5), and the command procedure 500 exits.

If the microprocessor 160 has received a command to adjust the targetintensity L_(TARGET) of the lamp 105 on at step 532, the microprocessorstores the new target intensity L_(TARGET) (from the received command)in the memory 170, and adjusts the drive control signal V_(DRIVE) to theinverter circuit 150 at step 534, so as to control the intensity of thelamp 105 to the target intensity L_(TARGET) received with the command.The microprocessor 160 then controls the length of the delay timeT_(DELAY) at steps 526-530, before the command procedure 500 exits. Ifthe microprocessor 160 has received a command to transmit the averageinput power P_(IN-AVE) at step 536, the microprocessor transmits at step538 a digital message including the average input power P_(IN-AVE) (ascalculated at step 458 of the power calculation procedure 450), and thecommand procedure 500 exits.

FIG. 10 is a simplified flowchart of the lamp strike routine 600 that isexecuted by the microprocessor 160 when the ballast 100 receives acommand to turn the lamp 105 on at step 520 of the command procedure500. The microprocessor 160 first controls the target bus voltageV_(B-TARGET) to the preheat-bus-voltage magnitude V_(B-PRE) at step 610,such that the microprocessor will begin adjusting the on time T_(ON) (aspart of the boost converter control procedure 400) to control themagnitude of the bus voltage V_(BUS) up to the preheat-bus-voltagemagnitude V_(B-PRE). The microprocessor 160 then waits until themagnitude of the bus voltage V_(BUS) is equal to approximately thepreheat-bus-voltage magnitude V_(B-PRE) (i.e., for the turn-on preloadtime period P_(PRELOAD-ON)) at step 612, before starting a preheat timerat step 614 and controlling the operating frequency f_(OP) of theinverter circuit 150 to the preheat frequency f_(PREHEAT) (i.e.,approximately 130 kHz) at step 616. Alternatively, the microprocessor160 could adjust the operating frequency f_(OP) of the inverter circuit150 in response to the magnitude of the load voltage feedback signalV_(FB-VLOAD) while preheating the filaments of the lamp 105, so as tocontrol the magnitude of the load voltage V_(LOAD) to the predeterminedpreheat load voltage V_(L-PRE) (as shown in FIG. 6).

The microprocessor 160 accumulates the cumulative output powerP_(OUT-CUM) of the boost converter 130 during the preheat time periodT_(PREHEAT) in order to calculate the average output power P_(OUT-AVE)to thus determine if the correct number and type of lamps are connectedto the ballast 100 and/or to determine if any of the lamps are missingor faulty. Accordingly, the microprocessor 160 resets the value of thecumulative output power P_(OUT-CUM) to zero Watts at step 618, and waitsfor the length of the preheat time period P_(PREHEAT) at step 620, whilecontinuing to accumulate the cumulative output power P_(OUT-CUM) (i.e.,at step 460 of the power calculation procedure 450). The microprocessor160 then ramps the operating duty cycle DC_(OP) up from an initial dutycycle (e.g., approximately 0%) to a preheat duty cycle DC_(PREHEAT)(e.g., approximately 50%) over a ramp time period T_(RAMP) (e.g.,approximately 50 milliseconds) at step 620, and then waits for the endof the preheat time period T_(PREHEAT) at step 622.

After the end of the preheat time period T_(PREHEAT) at step 622 (asdetermined from the preheat timer), the microprocessor 160 calculatesthe average output power P_(OUT-AVE) during the preheat time periodT_(PREHEAT) at step 624, i.e.,

P _(OUT-AVE) =P _(OUT-CUM) /N _(SAMP),  (Equation 7)

where N_(SAMP) is the number of samples during the preheat time period,i.e.,

N _(SAMP) =T _(PREHEAT) /T _(SAMP).  (Equation 8)

If the average output power P_(OUT-AVE) during the preheat time periodT_(PREHEAT) outside of the predetermined thresholds P_(T1), P_(T2) atstep 626, the microprocessor 160 turns off the lamp 105 by controllingthe target intensity L_(TARGET) of the lamp to 0% at step 628, andadjusting the drive control signal V_(DRIVE) to the inverter circuit 150at step 630. Accordingly, the lamp strike routine 600 exits withoutstriking the lamp.

If the cumulative output power P_(OUT) is greater than or equal to thefirst predetermined threshold P_(T1) and is less than or equal to thesecond predetermined threshold P_(T2) at step 626, the microprocessor160 attempts to strike the lamp 105. Specifically, the microprocessor160 initializes a strike timeout period T_(S-TO) to, for example,approximately 10 msec, and starts the strike timeout timer decreasingwith respect to time at step 632, and controls the operating frequencyf_(OP) towards a strike target frequency (e.g., approximately 50 kHz) bydecreasing the operating frequency f_(OP) by a predetermined frequencyvalue Δf_(OP) (e.g., approximately 150 Hz) at step 634. In addition, themicroprocessor 160 may also increase the duty cycle DC_(OP) of theinverter circuit 150 towards a strike target duty cycle (e.g.,approximately 35%) by a predetermined increment (e.g., approximately 1%)at step 634. The microprocessor 160 continues to decrease the operatingfrequency f_(OP) by the predetermined frequency value Δf_(OP) at step634 until the lamp strikes at step 636 or the strike timeout timerexpires at step 638. When the strike timeout timer expires at step 638,the microprocessor 160 waits for a sleep time period T_(SLEEP) (e.g.,approximately five seconds) at step 640 and then starts the lamp strikeroutine 600 over again to try to strike the lamp 105 once again. Whenthe lamp 105 has been struck at step 636, the microprocessor 160controls the target bus voltage V_(B-TARGET) to the on-bus-voltagemagnitude V_(B-ON) at step 638, recalls the target intensity L_(TARGET)from the memory 170 at step 640, and adjusts the drive control signalV_(DRIVE) in response to the target intensity L_(TARGET) at step 642,before the lamp strike routine 600 exits.

FIG. 11 is a simplified flowchart of a fault detection procedure 700executed periodically by the microprocessor 160 (e.g., approximatelyevery second) in order to determine if a fault condition exits in thelamps 105 (i.e., at least one of the lamp is the wrong lamp type). Ifthe target intensity L_(TARGET) is at the high-end intensity L_(HE) atstep 710, the microprocessor 160 resets the value of the cumulativeoutput power P_(OUT-CUM) to zero Watts at step 712, and waits for thelength of the predetermined time period T_(FAULT) at step 714, whilecontinuing to accumulate the cumulative output power P_(OUT-CUM) (i.e.,at step 460 of the power calculation procedure 450). At step 715, themicroprocessor 160 calculates the average output power P_(OUT-AVE)during the predetermined time period T_(FAULT), where N_(SAMP) is thenumber of samples during the predetermined time period T_(FAULT). If theaverage output power P_(OUT-AVE) during the predetermined time periodT_(FAULT) is within the predetermined limits P_(T3), P_(T4) at step 716,the fault detection procedure 700 simply exits (i.e., the correct numberand type of lamps 105 are connected to the ballast 100). However, if theaverage output power P_(OUT-AVE) is outside the predetermined limitsP_(T3), P_(T4) at step 716, the microprocessor 160 determines that afault condition exists at the lamps 105 and turns the lamps 105 off bystoring the present target intensity L_(TARGET) of the lamp in thememory 170 at step 718, controlling the target intensity L_(TARGET) ofthe lamp 105 to 0% at step 720, and adjusting the drive control signalV_(DRIVE) to the inverter circuit 150 to turn the lamp off at step 722.

According to a second embodiment of the present invention, themicroprocessor 160 is operable to measure the length of the off timeT_(OFF) and to use the length of the off time T_(OFF) to calculate theinstantaneous input power P_(INST) of the ballast 100 and the cumulativeoutput power P_(OUT-CUM) of the boost converter 130. FIG. 12A is asimplified flowchart of a boost converter control procedure 400′executed periodically by the microprocessor 160 (e.g., approximatelyevery 104 microseconds) according to the second embodiment of thepresent invention. The boost converter control procedure 400′ of thesecond embodiment is very similar to the boost converter controlprocedure 400 of the first embodiment (as shown in FIG. 8A). However, atthe end of the on time T_(ON) at step 416, the microprocessor 160initializes the off timer to zero seconds and starts the off timerincreasing in value with respect to time at step 426′. When themagnitude of the inductor current I_(L) drops to zero amps at step 420,the microprocessor 160 sets the off time T_(OFF) equal to the presentvalue of the off timer at step 428′. The microprocessor 160 will use theoff time T_(OFF) from step 428′ to calculate the instantaneous inputpower P_(INST) of the ballast 100 and the cumulative output powerP_(OUT-CUM) of the boost converter 130.

FIG. 12B is a simplified flowchart of a power calculation procedure 450′that is executed periodically by the microprocessor 160 at the samplingperiod T_(SAMP) (i.e., every 104 microseconds) according to the secondembodiment of the present invention. The power calculation procedure450′ of the second embodiment is very similar to the power calculationprocedure 450 of the first embodiment (as shown in FIG. 8B). However,the microprocessor 160 calculates a total time period T_(TOTAL) forpresent switching cycle of the inductor current I_(L) at step 462′ byadding the on time T_(ON) (from step 314 of the bus voltage controlprocedure 300), the off time T_(OFF) (from step 428′ of the boostconverter control procedure 400′), and the delay time T_(DELAY) (fromsteps 528, 530 of the command procedure 500), i.e.,

T _(TOTAL) =T _(ON) +T _(OFF) +T _(DELAY).  (Equation 9)

At step 464′, the microprocessor 160 calculates the instantaneous inputpower P_(INST) of the ballast 100, i.e.,

$\begin{matrix}{P_{INST} = {\frac{1}{2}{\left( {\frac{T_{ON}}{T_{TOTAL}} + \frac{T_{OFF}}{T_{TOTAL}}} \right) \cdot V_{RECT} \cdot {I_{L\text{-}{PK}}.}}}} & \left( {{Equation}\mspace{14mu} 10} \right)\end{matrix}$

The microprocessor 160 calculates the average input power P_(IN-AVE) ofthe ballast 100 at step 458, and the cumulative output power P_(OUT-CUM)of the boost converter 130 at step 460.

FIG. 13 is a simplified block diagram of a light-emitting diode (LED)driver 800 for controlling the intensity of an LED light source 805(e.g., an LED light engine) according to a third embodiment of thepresent invention. The LED driver 800 includes many similar functionalblocks as the electronic dimming ballast 100 of the first embodiment (asshown in FIG. 1). However, the LED driver 800 includes a load controlcircuit 840 comprising an LED drive circuit 850, which receives the busvoltage V_(BUS) and controls the amount of power delivered to the LEDlight source 805 so as to control the intensity of the LED light source.The LED drive circuit 850 may comprise, for example, acontrollable-impedance circuit (such as a linear regulator) or aswitching regulator (such as a buck converter). A control circuit, e.g.,a microprocessor 860, provides the drive control signal V_(DRIVE) to theLED drive circuit 850 for controlling at least one of the magnitude of aload current I_(LOAD) conducted through the LED light source 805 and themagnitude of a load voltage V_(LOAD) produced across the LED lightsource, so as to adjust the intensity of the LED light source. Examplesof LED drivers are described in greater detail in commonly-assigned U.S.patent application Ser. No. 12/813,908, filed Jun. 11, 2010, entitledLOAD CONTROL DEVICE FOR A LIGHT-EMITTING DIODE LIGHT SOURCE, the entiredisclosure of which is hereby incorporated by reference.

The LED driver 800 also includes a power converter 830, which maycomprise the boost converter 130 of the first embodiment. Themicroprocessor 860 is coupled to the power converter 830 for adjustingthe magnitude of the bus voltage V_(BUS) using the bus voltage controlprocedure 300 (shown in FIG. 7) and the boost converter controlprocedure 400 (shown in FIG. 8A). Alternatively, the power converter 830may comprise, for example, a buck converter, a buck-boost converter, aflyback converter, a buck-boost flyback converter, a single-endedprimary-inductor converter (SEPIC), a Ćuk converter, or other suitablepower converter circuit.

The microprocessor 860 is operable to control the magnitude of the busvoltage V_(BUS) to the on-bus-voltage magnitude V_(B-ON) when the LEDlight source 805 is on and to the off-bus-voltage magnitude V_(B-OFF)when the LED light source is off. In addition, the microprocessor 860preemptively adjusts the power-conversion-drive level of the powerconverter 830 prior to changing modes of operation. Specifically, themicroprocessor 860 adjusts the target bus voltage V_(B-TARGET) to theon-bus-voltage magnitude V_(B-ON), and then waits for the turn-onpreload time period V_(PRELOAD-ON) before turning on the LED lightsource 805. The microprocessor 860 is further operable to adjust thetarget bus voltage V_(B-TARGET) to the off-bus-voltage magnitudeV_(B-OFF), and then wait for a turn-off preload time periodT_(PRELOAD-OFF), before turning off the LED light source 805. Further,the microprocessor 860 may be operable to determine that the LED lightsource 805 has been removed (i.e., decoupled from the LED drive circuit850) or has filed while the LED driver 800 is energized and running inresponse to detecting a large, instantaneous drop in the magnitude ofthe load current I_(LOAD). The microprocessor 860 may then be operableadjust the magnitude of the bus voltage V_(BUS) to the off-bus-voltagemagnitude V_(B-OFF), and wait for the turn-off preload time periodT_(PRELOAD-OFF), before turning off the LED light source 805. Inaddition, the LED driver 800 may be operable to control the magnitude ofthe bus voltage V_(BUS) in response to a rated operating voltage of theLED light source 805, or in response to a voltage developed across theLED drive circuit 850 in order to optimize the amount of power consumedin the LED driver 800 as described in the previously-referencedapplication Ser. No. 12/813,908.

FIG. 14 is a simplified flowchart of a command procedure 900 executed bythe microprocessor 860 according to the third embodiment of the presentinvention when a command to control the LED light source 805 is receivedby the LED driver 800. The command procedure 900 of the third embodimentis very similar to the command procedure 500 of the first embodiment (asshown in FIG. 9). However, when the LED light source 805 is turned on atstep 524, the microprocessor 860 controls the target bus voltageV_(B-TARGET) to the on-bus-voltage magnitude V_(B-ON) at step 950, suchthat the microprocessor will begin adjusting the power-conversion-drivelevel of the power converter 830 (i.e., the on time T_(ON)) to controlthe magnitude of the bus voltage V_(BUS) up to the on-bus-voltagemagnitude V_(B-ON). The microprocessor 860 waits for the turn-on preloadtime period T_(PRELOAD-ON) at step 952 and adjusts the drive controlsignal V_(DRIVE) to the LED drive circuit 850 at step 954 to control theintensity of the LED light source 805 to the target intensity L_(TARGET)(e.g., as received with the command or as stored in the memory 170),before the command procedure 900 exits.

In addition, when the LED lighting source 805 is turned off at step 512,the microprocessor 860 controls the target bus voltage V_(B-TARGET) tothe off-bus-voltage magnitude V_(B-OFF) at step 960, to begin adjustingthe power-conversion-drive level of the boost converter 130 (i.e., theon time T_(ON)), so as to bring the magnitude of the bus voltage V_(BUS)down to the off-bus-voltage magnitude V_(B-OFF). The microprocessor 860then waits for the turn-off preload time period T_(PRELOAD-OFF) at step962, before controlling the target intensity L_(TARGET) to 0% (i.e.,turning the LED light source 805 off) at step 520, and adjusting thedrive control signal V_(DRIVE) to the inverter circuit 150 to turn thelamp off at step 522.

Alternatively, the hot terminal H of the ballast 100 of the first andsecond embodiments and the LED driver 800 of the third embodiment couldbe adapted to receive the phase-control signal V_(PC) rather than thefull AC mains line voltage V_(AC), such that the ballast and the LEDdriver are operable to both receive power and determine the targetintensity L_(TARGET) from the phase-control signal V_(PC). An example ofa load control device that receives both power and control informationfrom a single terminal is described in greater detail incommonly-assigned U.S. patent application Ser. No. 12/704,781, filedFeb. 12, 2010, entitled HYBRID LIGHT SOURCE, the entire disclosure ofwhich is hereby incorporated by reference.

While the present invention has been described with reference to theballast 100 and the LED driver 800, the methods of controlling themagnitude of the bus voltage V_(BUS) of a power converter describedherein may be used in other types of load control devices, such as, forexample, a dimmer switch for a lighting load, an electronic switch, aswitching circuit including a relay, a controllable plug-in moduleadapted to be plugged into an electrical receptacle, a controllablescrew-in module adapted to be screwed into the electrical socket (e.g.,an Edison socket) of a lamp, a motor speed control device, or amotorized window treatment.

Although the present invention has been described in relation toparticular embodiments thereof, many other variations and modificationsand other uses will become apparent to those skilled in the art. It ispreferred, therefore, that the present invention be limited not by thespecific disclosure herein, but only by the appended claims.

What is claimed is:
 1. A load control device for controlling the powerdelivered from a power source to an electrical load, the load controldevice comprising: a power converter for generating a bus voltage, thepower converter comprising an inductor and a power switching devicecoupled to the inductor, the inductor operable to charge when the powerswitching device is conductive and to discharge when the power switchingdevice is non-conductive, the power switching device controlled to beconducive for an on time; a load control circuit receiving the busvoltage and adapted to be coupled to the electrical load for controllingthe power delivered to load; and a control circuit operatively coupledto the load control circuit for controlling the power delivered to thelamp, the control circuit receiving a control signal representative ofan instantaneous magnitude of a source voltage of the power source, thecontrol circuit operatively coupled to the power switching device of thepower converter for controlling the length of the on time; wherein thecontrol circuit is configured to determine an average input power of theload control device using the on time of the power switching device ofthe power converter and the instantaneous magnitude of the sourcevoltage.
 2. The load control device of claim 1, wherein the controlcircuit is configured to calculate a peak magnitude of an inductorcurrent conducted through the inductor of the power converter using theon time of the power switching device of the power converter, theinstantaneous magnitude of the source voltage, and an inductance of theinductor of the power converter.
 3. The load control device of claim 2,wherein the inductor current increases in magnitude during the on timewhile the power switching device is conductive and, after the on time,decreases in magnitude during an off time while the power switchingdevice is non-conductive until the magnitude of the inductor currentdrops to approximately zero amps.
 4. The load control device of claim 3,wherein the power switching device is maintained non-conductive for adelay time after the off time.
 5. The load control device of claim 4,wherein the control circuit is configured to calculate the average inputpower using the instantaneous magnitude of the source voltage, the peakmagnitude of the inductor current, and the lengths of the on time andthe delay time.
 6. The load control device of claim 4, wherein thecontrol circuit is configured to calculate the average input power usingthe instantaneous magnitude of the source voltage, the peak magnitude ofthe inductor current, and the lengths of the on time, the off time, andthe delay time.
 7. The load control device of claim 3, wherein thecontrol circuit is configured to calculate the average input power usingthe instantaneous magnitude of the source voltage, the peak magnitude ofthe inductor current, and the lengths of the on time and the off time.8. The load control device of claim 2, wherein the control circuit isconfigured to calculate the average input power using the on time, theinstantaneous magnitude of the source voltage, and the peak magnitude ofthe inductor current.
 9. The load control device of claim 2, wherein thecontrol circuit is configured to calculate an instantaneous input powerof the load control device using the on time of the power switchingdevice of the power converter, the instantaneous magnitude of the sourcevoltage, and the peak magnitude of the inductor current, the controlcircuit configured to use a running average to calculate the averageinput from the instantaneous input power.
 10. The load control device ofclaim 1, wherein the control circuit is configured to determine aninstantaneous input power of the load control device, and to use arunning average to calculate the average input from the instantaneousinput power.
 11. The load control device of claim 1, further comprising:a communication circuit coupled to the control circuit, such that thecontrol circuit is configured to transmit a digital message includingthe average input power of the load control device.
 12. The load controldevice of claim 1, wherein the power converter comprises a boostconverter.
 13. The load control device of claim 1, wherein theelectrical load comprises a gas discharge lamp the load control circuitcomprises a ballast circuit for controlling the intensity of the lamp.14. The load control device of claim 1, wherein the electrical loadcomprises an LED light source and the load control circuit comprises anLED drive circuit for controlling the intensity of the LED light source.15. A load control device for controlling the power delivered from apower source to an electrical load, the load control device comprising:a power converter for generating a bus voltage, the power convertercomprising an inductor and a power switching device coupled to theinductor, such that the inductor is operable to charge when the powerswitching device is conductive and to discharge when the power switchingdevice is non-conductive, the power switching device controlled to beconducive for an on time; a load control circuit receiving the busvoltage and adapted to be coupled to the electrical load for controllingthe power delivered to load; and a control circuit operatively coupledto the load control circuit for controlling the power delivered to thelamp, the control circuit receiving a control signal representative ofan instantaneous magnitude of a source voltage of the power source, thecontrol circuit operatively coupled to the power switching device of thepower converter for controlling the length of the on time; and acommunication circuit coupled to the control circuit for transmittingand receiving digital messages; wherein the control circuit isconfigured to determine an average input power of the load controldevice using the on time of the power switching device of the powerconverter and the instantaneous magnitude of the source voltage, thecontrol circuit configured to transmit a digital message including theaverage input power of the load control device via the communicationcircuit.
 16. The load control device of claim 15, wherein the controlcircuit is configured to calculate a peak magnitude of an inductorcurrent conducted through the inductor of the power converter using theon time of the power switching device of the power converter, theinstantaneous magnitude of the source voltage, and an inductance of theinductor of the power converter.
 17. The load control device of claim16, wherein the control circuit is configured to calculate the averageinput power using the on time of the power switching device of the powerconverter, the instantaneous magnitude of the source voltage, and thepeak magnitude of the inductor current.
 18. The load control device ofclaim 15, wherein the control circuit is configured to determine aninstantaneous input power of the load control device, and to use arunning average to calculate the average input from the instantaneousinput power.
 19. The load control device of claim 15, wherein the powerconverter comprises a boost converter.
 20. The load control device ofclaim 15, wherein the electrical load comprises a gas discharge lamp theload control circuit comprises a ballast circuit for controlling theintensity of the lamp.
 21. The load control device of claim 15, whereinthe electrical load comprises an LED light source and the load controlcircuit comprises an LED drive circuit for controlling the intensity ofthe LED light source.
 22. A method of transmitting a digital messagefrom a load control device for controlling the power delivered from apower source to an electrical load, the load control device comprising apower converter having an inductor and a power switching device coupledto the inductor, the method comprising: selectively rendering the powerswitching device conductive and non-conductive to generate a busvoltage, such that the inductor is operable to charge when the powerswitching device is conductive and to discharge when the power switchingdevice is non-conductive; adjusting the length of an on time for whichthe power switching device is conductive; converting the bus voltage toa high-frequency AC voltage; coupling the high-frequency AC voltage tothe lamps; calculating an input power of the boost converter using theon time of the power switching device and an instantaneous magnitude ofa source voltage of the power source; and transmitting a digital messageincluding the calculated average input power of the load control device.